What a strange error...

What a strange error...

am 29.06.2010 14:37:38 von Tosh Cooey

I have an application with a program called [mailfile.pl] which runs
under MP::Registry and is accessed via some mod_rewrites.

Today I pushed a new version from my DEV server to the WWW server using
rsync. Obviously it was working perfectly on DEV.

However the new [mailfile.pl] died with an error on WWW:

[error] (2)No such file or directory: exec of
'/srv/www/htdocs/b2b/mailfile.pl' failed
[error] Premature end of script headers: mailfile.pl, referer: http://www...

I have no idea why that is happening, and here is where things get
strange: I copied [mailfile.pl] to [mailfile2.pl] and rolled back to
the previous working version of [mailfile.pl] so now everything is back
to how it was before. Now if I make a call to [mailfile2.pl] (broken as
mailfile.pl) that works like a charm.

So to recap: [mailfile.pl] = old version, [mailfile2.pl] = new.

Both of the above work. Rename [mailfile2.pl] to [mailfile.pl] then it
dies with the above error.

Naturally this was all accompanied by generous stopping and starting of
Apache.

Has anyone come across anything like this before? Any ideas where to
start looking for a solution other than just mod_rewrite mailfile.pl
mailfile2.pl ?

Thanks!


--
McIntosh Cooey - Twelve Hundred Group LLC - http://www.1200group.com/

Re: What a strange error...

am 29.06.2010 14:46:58 von Cosimo Streppone

On Tue, 29 Jun 2010 14:37:38 +0200, Tosh Cooey wrote:

> I have an application with a program called [mailfile.pl] which runs
> under MP::Registry and is accessed via some mod_rewrites.
>
> Today I pushed a new version from my DEV server to the WWW server using
> rsync. Obviously it was working perfectly on DEV.
>
> However the new [mailfile.pl] died with an error on WWW:
>
> [error] (2)No such file or directory: exec of
> '/srv/www/htdocs/b2b/mailfile.pl' failed
> [error] Premature end of script headers: mailfile.pl, referer:
> http://www...

That reminds me:

1) chmod +x mailfile.pl
2) dos2unix mailfile.pl

--
Cosimo

Re: What a strange error...

am 29.06.2010 14:55:05 von Tosh Cooey

Ha ha... Yes I wondered about that too, except then why would it run as
mailfile2.pl after only: cp mailfile.pl mailfile2.pl ?

However the programmer working on that file uses Windows and so who
knows, maybe this is the solution, but not the answer...

Thanks!

Tosh


Cosimo Streppone wrote:
> On Tue, 29 Jun 2010 14:37:38 +0200, Tosh Cooey wrote:
>
>> I have an application with a program called [mailfile.pl] which runs
>> under MP::Registry and is accessed via some mod_rewrites.
>>
>> Today I pushed a new version from my DEV server to the WWW server
>> using rsync. Obviously it was working perfectly on DEV.
>>
>> However the new [mailfile.pl] died with an error on WWW:
>>
>> [error] (2)No such file or directory: exec of
>> '/srv/www/htdocs/b2b/mailfile.pl' failed
>> [error] Premature end of script headers: mailfile.pl, referer:
>> http://www...
>
> That reminds me:
>
> 1) chmod +x mailfile.pl
> 2) dos2unix mailfile.pl
>

--
McIntosh Cooey - Twelve Hundred Group LLC - http://www.1200group.com/

Re: What a strange error...

am 29.06.2010 15:00:26 von Tosh Cooey

Maybe I should have followed up instead of sending this so quickly, oh well.

Yes the Windows CR/LF was the problem. So the situation is resolved,
but I have no clue why the same file with different names was
inconsistent in execution.

Oh well, don't look a gift horse in the mouth I guess, thanks Cosimo!

Tosh


Tosh Cooey wrote:
> Ha ha... Yes I wondered about that too, except then why would it run as
> mailfile2.pl after only: cp mailfile.pl mailfile2.pl ?
>
> However the programmer working on that file uses Windows and so who
> knows, maybe this is the solution, but not the answer...
>
> Thanks!
>
> Tosh
>
>
> Cosimo Streppone wrote:
>> On Tue, 29 Jun 2010 14:37:38 +0200, Tosh Cooey
>> wrote:
>>
>>> I have an application with a program called [mailfile.pl] which runs
>>> under MP::Registry and is accessed via some mod_rewrites.
>>>
>>> Today I pushed a new version from my DEV server to the WWW server
>>> using rsync. Obviously it was working perfectly on DEV.
>>>
>>> However the new [mailfile.pl] died with an error on WWW:
>>>
>>> [error] (2)No such file or directory: exec of
>>> '/srv/www/htdocs/b2b/mailfile.pl' failed
>>> [error] Premature end of script headers: mailfile.pl, referer:
>>> http://www...
>>
>> That reminds me:
>>
>> 1) chmod +x mailfile.pl
>> 2) dos2unix mailfile.pl
>>
>

--
McIntosh Cooey - Twelve Hundred Group LLC - http://www.1200group.com/

Re: What a strange error...

am 29.06.2010 16:33:09 von Chris Bennett

Tosh Cooey wrote:
> Maybe I should have followed up instead of sending this so quickly, oh
> well.
>
> Yes the Windows CR/LF was the problem. So the situation is resolved,
> but I have no clue why the same file with different names was
> inconsistent in execution.
>
> Oh well, don't look a gift horse in the mouth I guess, thanks Cosimo!
>
> Tosh
>
>
> Tosh Cooey wrote:
>> Ha ha... Yes I wondered about that too, except then why would it run
>> as mailfile2.pl after only: cp mailfile.pl mailfile2.pl ?
>>
>> However the programmer working on that file uses Windows and so who
>> knows, maybe this is the solution, but not the answer...
>>
>> Thanks!
>>
>> Tosh
>>
>>
>> Cosimo Streppone wrote:
>>> On Tue, 29 Jun 2010 14:37:38 +0200, Tosh Cooey
>>> wrote:
>>>
>>>> I have an application with a program called [mailfile.pl] which runs
>>>> under MP::Registry and is accessed via some mod_rewrites.
>>>>
>>>> Today I pushed a new version from my DEV server to the WWW server
>>>> using rsync. Obviously it was working perfectly on DEV.
>>>>
>>>> However the new [mailfile.pl] died with an error on WWW:
>>>>
>>>> [error] (2)No such file or directory: exec of
>>>> '/srv/www/htdocs/b2b/mailfile.pl' failed
>>>> [error] Premature end of script headers: mailfile.pl, referer:
>>>> http://www...
>>>
>>> That reminds me:
>>>
>>> 1) chmod +x mailfile.pl
>>> 2) dos2unix mailfile.pl
>>>
>>
>

Perhaps cp removes the wrong line endings?

Anyway, you can also fix files with vi
:%s/ctrl-v ctrl-m//g

Works like a charm. I don't have dos2unix.

Chris Bennett

Re: What a strange error...

am 29.06.2010 17:27:10 von Devin Teske

On Tue, 2010-06-29 at 09:33 -0500, Chris Bennett wrote:
> Tosh Cooey wrote:
> > Maybe I should have followed up instead of sending this so quickly, oh
> > well.
> >
> > Yes the Windows CR/LF was the problem. So the situation is resolved,
> > but I have no clue why the same file with different names was
> > inconsistent in execution.
> >
> > Oh well, don't look a gift horse in the mouth I guess, thanks Cosimo!
> >
> > Tosh
> >
> >
> > Tosh Cooey wrote:
> >> Ha ha... Yes I wondered about that too, except then why would it run
> >> as mailfile2.pl after only: cp mailfile.pl mailfile2.pl ?
> >>
> >> However the programmer working on that file uses Windows and so who
> >> knows, maybe this is the solution, but not the answer...
> >>
> >> Thanks!
> >>
> >> Tosh
> >>
> >>
> >> Cosimo Streppone wrote:
> >>> On Tue, 29 Jun 2010 14:37:38 +0200, Tosh Cooey
> >>> wrote:
> >>>
> >>>> I have an application with a program called [mailfile.pl] which runs
> >>>> under MP::Registry and is accessed via some mod_rewrites.
> >>>>
> >>>> Today I pushed a new version from my DEV server to the WWW server
> >>>> using rsync. Obviously it was working perfectly on DEV.
> >>>>
> >>>> However the new [mailfile.pl] died with an error on WWW:
> >>>>
> >>>> [error] (2)No such file or directory: exec of
> >>>> '/srv/www/htdocs/b2b/mailfile.pl' failed
> >>>> [error] Premature end of script headers: mailfile.pl, referer:
> >>>> http://www...
> >>>
> >>> That reminds me:
> >>>
> >>> 1) chmod +x mailfile.pl
> >>> 2) dos2unix mailfile.pl
> >>>
> >>
> >
>
> Perhaps cp removes the wrong line endings?
>
> Anyway, you can also fix files with vi
> :%s/ctrl-v ctrl-m//g
>
> Works like a charm. I don't have dos2unix.
>
> Chris Bennett
>

Another way in vi ...

Set "fileformat" to "unix":

:set ff=unix
:w



--
Cheers,
Devin Teske

-> CONTACT INFORMATION <-
Business Solutions Consultant II
FIS - fisglobal.com
510-735-5650 Mobile
510-621-2038 Office
510-621-2020 Office Fax
909-477-4578 Home/Fax
devin.teske@fisglobal.com

-> LEGAL DISCLAIMER <-
This message contains confidential and proprietary information
of the sender, and is intended only for the person(s) to whom it
is addressed. Any use, distribution, copying or disclosure by any
other person is strictly prohibited. If you have received this
message in error, please notify the e-mail sender immediately,
and delete the original message without making a copy.

-> END TRANSMISSION <-

Re: What a strange error...

am 29.06.2010 19:21:07 von Tosh Cooey

vi? I just send mine to India and pay some guy $1 to remove them with
his teeth.

Tosh


Devin Teske wrote:
> On Tue, 2010-06-29 at 09:33 -0500, Chris Bennett wrote:
>> Tosh Cooey wrote:
>>> Maybe I should have followed up instead of sending this so quickly, oh
>>> well.
>>>
>>> Yes the Windows CR/LF was the problem. So the situation is resolved,
>>> but I have no clue why the same file with different names was
>>> inconsistent in execution.
>>>
>>> Oh well, don't look a gift horse in the mouth I guess, thanks Cosimo!
>>>
>>> Tosh
>>>
>>>
>>> Tosh Cooey wrote:
>>>> Ha ha... Yes I wondered about that too, except then why would it run
>>>> as mailfile2.pl after only: cp mailfile.pl mailfile2.pl ?
>>>>
>>>> However the programmer working on that file uses Windows and so who
>>>> knows, maybe this is the solution, but not the answer...
>>>>
>>>> Thanks!
>>>>
>>>> Tosh
>>>>
>>>>
>>>> Cosimo Streppone wrote:
>>>>> On Tue, 29 Jun 2010 14:37:38 +0200, Tosh Cooey
>>>>> wrote:
>>>>>
>>>>>> I have an application with a program called [mailfile.pl] which runs
>>>>>> under MP::Registry and is accessed via some mod_rewrites.
>>>>>>
>>>>>> Today I pushed a new version from my DEV server to the WWW server
>>>>>> using rsync. Obviously it was working perfectly on DEV.
>>>>>>
>>>>>> However the new [mailfile.pl] died with an error on WWW:
>>>>>>
>>>>>> [error] (2)No such file or directory: exec of
>>>>>> '/srv/www/htdocs/b2b/mailfile.pl' failed
>>>>>> [error] Premature end of script headers: mailfile.pl, referer:
>>>>>> http://www...
>>>>> That reminds me:
>>>>>
>>>>> 1) chmod +x mailfile.pl
>>>>> 2) dos2unix mailfile.pl
>>>>>
>> Perhaps cp removes the wrong line endings?
>>
>> Anyway, you can also fix files with vi
>> :%s/ctrl-v ctrl-m//g
>>
>> Works like a charm. I don't have dos2unix.
>>
>> Chris Bennett
>>
>
> Another way in vi ...
>
> Set "fileformat" to "unix":
>
> :set ff=unix
> :w
>
>
>

--
McIntosh Cooey - Twelve Hundred Group LLC - http://www.1200group.com/

Re: What a strange error...

am 29.06.2010 19:28:12 von ELINTPimp

--001636499011f913b0048a2e90ec
Content-Type: text/plain; charset=ISO-8859-1

nice.

On a related note...some of our developers use the EPIC plugin in eclipse to
create/modify remote .pl and .pm files. Same issue (CR/LF) - we usually run
a clean.pl script recursively on directories on the dev server during
development/prior to generating a build. Needless to say, this gets old
quickly when trying to do rapid development/testing. Does anybody know how
to get eclipse to do the right thing using the Remote Systems perspective so
we don't have to manually run our cleanup script during development?

Thanks,

Steve

On Tue, Jun 29, 2010 at 1:21 PM, Tosh Cooey wrote:

> vi? I just send mine to India and pay some guy $1 to remove them with his
> teeth.
>
> Tosh
>
>
>
> Devin Teske wrote:
>
>> On Tue, 2010-06-29 at 09:33 -0500, Chris Bennett wrote:
>>
>>> Tosh Cooey wrote:
>>>
>>>> Maybe I should have followed up instead of sending this so quickly, oh
>>>> well.
>>>>
>>>> Yes the Windows CR/LF was the problem. So the situation is resolved,
>>>> but I have no clue why the same file with different names was inconsistent
>>>> in execution.
>>>>
>>>> Oh well, don't look a gift horse in the mouth I guess, thanks Cosimo!
>>>>
>>>> Tosh
>>>>
>>>>
>>>> Tosh Cooey wrote:
>>>>
>>>>> Ha ha... Yes I wondered about that too, except then why would it run as
>>>>> mailfile2.pl after only: cp mailfile.pl mailfile2.pl ?
>>>>>
>>>>> However the programmer working on that file uses Windows and so who
>>>>> knows, maybe this is the solution, but not the answer...
>>>>>
>>>>> Thanks!
>>>>>
>>>>> Tosh
>>>>>
>>>>>
>>>>> Cosimo Streppone wrote:
>>>>>
>>>>>> On Tue, 29 Jun 2010 14:37:38 +0200, Tosh Cooey
>>>>>> wrote:
>>>>>>
>>>>>> I have an application with a program called [mailfile.pl] which runs
>>>>>>> under MP::Registry and is accessed via some mod_rewrites.
>>>>>>>
>>>>>>> Today I pushed a new version from my DEV server to the WWW server
>>>>>>> using rsync. Obviously it was working perfectly on DEV.
>>>>>>>
>>>>>>> However the new [mailfile.pl] died with an error on WWW:
>>>>>>>
>>>>>>> [error] (2)No such file or directory: exec of '/srv/www/htdocs/b2b/
>>>>>>> mailfile.pl' failed
>>>>>>> [error] Premature end of script headers: mailfile.pl, referer:
>>>>>>> http://www...
>>>>>>>
>>>>>> That reminds me:
>>>>>>
>>>>>> 1) chmod +x mailfile.pl
>>>>>> 2) dos2unix mailfile.pl
>>>>>>
>>>>>> Perhaps cp removes the wrong line endings?
>>>
>>> Anyway, you can also fix files with vi
>>> :%s/ctrl-v ctrl-m//g
>>>
>>> Works like a charm. I don't have dos2unix.
>>>
>>> Chris Bennett
>>>
>>>
>> Another way in vi ...
>>
>> Set "fileformat" to "unix":
>>
>> :set ff=unix
>> :w
>>
>>
>>
>>
> --
> McIntosh Cooey - Twelve Hundred Group LLC - http://www.1200group.com/
>

--001636499011f913b0048a2e90ec
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

nice.

On a related note...some of our developers use the EPIC plugin=
in eclipse to create/modify remote .pl and .pm files.=A0 Same issue (CR/LF=
) - we usually run a script recurs=
ively on directories on the dev server during development/prior to generati=
ng a build.=A0 Needless to say, this gets old quickly when trying to do rap=
id development/testing. Does anybody know how to get eclipse to do the righ=
t thing using the Remote Systems perspective so we don't have to manual=
ly run our cleanup script during development?



Thanks,

Steve

On Tue, Jun 29, =
2010 at 1:21 PM, Tosh Cooey < 00group.com">tosh@1200group.com> wrote:
=3D"gmail_quote" style=3D"margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid=
rgb(204, 204, 204); padding-left: 1ex;">

vi? =A0I just send mine to India and pay some guy $1 to remove them with hi=
s teeth.



Tosh






Devin Teske wrote:

r-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
On Tue, 2010-06-29 at 09:33 -0500, Chris Bennett wrote:

r-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Tosh Cooey wrote:

r-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Maybe I should have followed up instead of sending this so quickly, oh well=
..



Yes the Windows CR/LF was the problem. =A0So the situation is resolved, but=
I have no clue why the same file with different names was inconsistent in =
execution.



Oh well, don't look a gift horse in the mouth I guess, thanks Cosimo! r>


Tosh





Tosh Cooey wrote:

r-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Ha ha... Yes I wondered about that too, except then why would it run as href=3D"http://mailfile2.pl" target=3D"_blank">mailfile2.pl after only:=
cp f=3D"http://mailfile2.pl" target=3D"_blank">mailfile2.pl ?





However the programmer working on that file uses Windows and so who knows, =
maybe this is the solution, but not the answer...



Thanks!



Tosh





Cosimo Streppone wrote:

r-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
On Tue, 29 Jun 2010 14:37:38 +0200, Tosh Cooey < 200group.com" target=3D"_blank">tosh@1200group.com> wrote:



r-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I have an application with a program called [ target=3D"_blank">mailfile.pl] which runs under MP::Registry and is ac=
cessed via some mod_rewrites.



Today I pushed a new version from my DEV server to the WWW server using rsy=
nc. =A0Obviously it was working perfectly on DEV.



However the new [mailfile.=
pl
] died with an error on WWW:



[error] (2)No such file or directory: exec of '/srv/www/htdocs/b2b/ ref=3D"http://mailfile.pl" target=3D"_blank">mailfile.pl' failed >
[error] Premature end of script headers: get=3D"_blank">mailfile.pl, referer: _blank">http://www...


That reminds me:



1) chmod +x mailfile.pl >

2) dos2unix
mailfile.pl >




Perhaps cp removes the wrong line endings?



Anyway, you can also fix files with vi

:%s/ctrl-v ctrl-m//g



Works like a charm. I don't have dos2unix.



Chris Bennett






Another way in vi ...



Set "fileformat" to "unix":



:set ff=3Dunix

:w










--



--001636499011f913b0048a2e90ec--